// import http from './http';
import axios from '@/api/interceptor';
// import axios from '../axios';
import { ComponentSearch, ComponentSearchParams } from './projectDetail.d';

export function formComponentSearch(model: ComponentSearchParams) {
    return axios.post<ComponentSearch>('/config/component/search', model);
}

export function formComponentRead(id: number){
    return axios.get(`/config/component/${id}`);
}
export function seriesImport(model: any){
    return axios.post("/anno/task/series/import", model);
}

export function lesionGroupSearch(model: any){
    return axios.post("/config/lesion/group/search", model);
}

export function toolSearch(model: any){
    return axios.post("/config/tool/search", model);
}

export function validateTaskName(model: any){
    return axios.post("/anno/task/name/existed", model);
}

export function getProcessInfo(model: any){
    return axios.post("/image/transfer/result/query", model);
}

export function executeTransfer(model: any){
    return axios.post("/image/transfer/execute", model);
}

export function restartTransfer(model: any){
    return axios.post("/image/transfer/restart", model);
}
export function pauseTransfer(model: any){
    return axios.post("/image/transfer/pause", model);
}

export function exportTransfer(model: any, config: any){
    return axios.post("/image/transfer/result/export", model, config);
}






export function getCompanylist(model: any){
    return axios.post("/company/list", model);
}

export function userSearch(model: any){
    return axios.post("/user/search", model);
}

export function taskCreate(model: any){
    return axios.post("/anno/task", model);
}
export function taskUpdate(model: any){
    return axios.put("/anno/task", model);
}
export function annoTask(id: any){
    return axios.get(`/anno/task/${id}`);
}












// export function formComponentSearch(model :any) {
//   return http.post<ComponentSearch>("/config/formComponent/search", model)
// }


// function projectNameExist(model){
//     return http.post("/aaa/v1/project/name/exist", model)
// }
// function projectDetail(model){
//     return http.post("/aaa/v1/project/basic/read", model)
// }

// function formComponentSearch(model){
//     return http.post("/config/formComponent/search", model)
// }

// function formComponentQuery(model){
//     return http.post("/aaa/v1/formComponent/query", model)
// }

// function seriesExport(model){
//     return http.get("/aaa/v1/project/series/auxiliary_series/export?param="+model)
// }

// function listTool(model){
//     return http.post("/aaa/v1/alg/sar/list_tool", model);
// }

// function projectCreate(model){
//     return http.post("/aaa/v2/project/create", model);
// }
// function projectUpdate(model){
//     return http.post("/aaa/v2/project/update", model);
// }




// function joinAlg(model){
//     return http.post("/aaa/v1/project/edit/joinAlg", model); 
// }

// function heartSegmentStart(model){
//     return http.post("/aaa/v1/heartSegment/start", model);
// }

// function heartSegmentResultRead(model){
//     return http.post("/aaa/v1/heartSegment/resultRead", model);
// }

// function projectEetailV2(projectId){
//     return http.get(`/aaa/v2/project/detail/${projectId}`);

// }

// function heartSegmentExport(model){
//     return http.get(`/aaa/v1/heartSegment/export?param=${model}`);
// }

// function getImportResultList(model){
//     return http.post("/aaa/v1/alg/sar/get_import_result_list/search", model);
// }

// function formComponentRead(model){
//     return http.post("/aaa/v1/formComponent/read", model);
// }

// function sarImport(model){
//     return http.post("/aaa/v1/alg/sar/import", model);
// }







// export {
//     projectNameExist,
//     projectDetail,
//     formComponentSearch,
//     formComponentQuery,
//     seriesExport,
//     listTool,
//     projectCreate,
//     projectUpdate,
//     joinAlg,
//     heartSegmentStart,
//     heartSegmentResultRead,
//     projectEetailV2,
//     heartSegmentExport,
//     getImportResultList,
//     formComponentRead,
//     sarImport,
// }

